package it.antonio.ilpizze.db.core.id;

public class RecordFilePositionId implements FilePositionId{
	
	private long pos;
	
	private RecordFilePositionId(long pos) {
		this.pos = pos;
	}

	@Override
	public long pos(){
		return pos;
	}
	
	@Override
	public boolean equals(Object o) {
		if(o instanceof RecordFilePositionId){
			RecordFilePositionId another = (RecordFilePositionId) o;
			if(another.pos == pos) return true;
		}
		return false;
	}
	
	public static FilePositionId atPosition(long pos){
		return new RecordFilePositionId(pos);
	}
	
}
